<%@page import="java.sql.SQLException"%>
<%@page import="java.sql.ResultSet"%>
<%@page import="com.henu.Db.DbUtil"%>
<%@page import="sun.security.pkcs11.Secmod.DbMode"%>
<%@page import="java.sql.PreparedStatement"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
	<%
	String sql = "select count(1) from borrow where bookname=?";
	PreparedStatement ps = DbUtil.executePreparedStatement(sql);
	ResultSet rs = null;
	int c = 0;
	try{
		ps.setString(1, "javaweb");
		rs = ps.executeQuery();
		if(rs.next()){
			c = rs.getRow();
		}else{
			System.out.print("asdsad");
		}
	}catch(SQLException e){
		e.printStackTrace();
	}
	System.out.print(c);
	%>
</body>
</html>